<template>
  <div>
    <div class="symc"
         v-for="(item,index) in tempValue"
         :key="index">
      <span class="text">一级菜单</span>
      <div class="action-bar">
        <div class="left">
          <img src="">
          <div class="title">{{item.text}}</div>
        </div>
        <div class="right">
          <el-input v-model="tempValue[index].text">
            <template slot="prepend">文字</template>
          </el-input>
          <el-input v-model="tempValue[index].class">
            <template slot="prepend">图片</template>
          </el-input>
        </div>
      </div>
    </div>
    <el-button>熙增</el-button>
  </div>
</template>

<script>
export default {
  name: "qkTabbarAttr",
  props: {
    prop: {
      type: Array,
      default () {
        return [
        ]
      }
    }
  },
  watch: {
    'prop' (e) {
      console.log(e)
    },
    deep: true
  },
  data () {
    return {
      tempValue: []
    }
  },
  mounted () {
    this.tempValue = this.prop;
  },
}
</script>

<style lang="scss" scoped>
.symc {
  width: 100%;
  height: 150px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  border: 1px solid #ddd;
  .text {
    text-align: left;
    display: block;
    width: 100%;
    height: 50px;
    line-height: 50px;
    font-size: 18px;
    padding-left: 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #ddd;
  }
  .action-bar {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    height: 100px;
    align-items: center;
    .left {
      width: 80px;
      height: 80px;
      box-sizing: border-box;
      border: 1px solid #ddd;
      margin-right: 5px;
      margin-left: 5px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      flex-flow: column nowrap;
      border-radius: 6px;
      & .title {
        letter-spacing: 5px;
      }
    }
    .right {
      flex: 1;
      // display: flex;
      // flex-direction: column;
      // justify-content: space-around;
      // align-items: center;
    }
  }
}
</style>